package com.xquant.marketdata.marketdata.mapper;


import com.xquant.marketdata.marketdata.entity.DailyQuote;
import com.xquant.marketdata.marketdata.entity.EntityMapping;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface TdailyQuoteMapper {

    int insert(HashMap record);

    int insertBatch(@Param("dailyQuotes") List<DailyQuote> dailyQuotes);

    HashMap selectByPrimaryKey(HashMap key);

    List<Map> selectListByPage(Map<String, Object> key);

    List<EntityMapping> getEntityMappingByDictType(Map<String,Object> params);


    void updateQuoteDpBeforeBegdat(DailyQuote termsQuote);

    void updateQuoteDpAfterEnddat(DailyQuote termsQuote);

    void updateIndexDpToNewBegdate(DailyQuote termsQuote);

    void insertEntity(DailyQuote termsQuote);

    List<DailyQuote> selectDailyQuote(@Param("list") List<DailyQuote> list,@Param("begDate") String begDate,@Param("aType") String iCode,@Param("mType") String mType);
    List<DailyQuote> selectTdefcurveRefSet(@Param("list") List<DailyQuote> list,@Param("list2") List<DailyQuote> list2);


    int insertDailyQuote(DailyQuote quote);

    int updateDailyQuote(DailyQuote quote);

	String selectmaxEnd(DailyQuote quote);

    List<DailyQuote> selectInvalidQuote(@Param("quotes") List<DailyQuote> list);

    void deleteDailyQuote(DailyQuote  record);
}
